import { FormSchema } from '@/components/Form';
import { bizMetaAttrKeyList, priceUnitList, uiComponentList } from '@/enums/spuEnum';

export const modalFormSchema: FormSchema[] = [
  {
    field: 'id',
    label: 'id',
    ifShow: false,
    component: 'Input',
  },
  {
    field: 'parentCnName',
    label: 'parentCnName',
    ifShow: false,
    component: 'Input',
  },
  {
    field: 'parentId',
    label: '父级',
    slot: 'parentId',
  },
  {
    required: true,
    field: 'cnName',
    label: '中文名',
    component: 'Input',
  },
  {
    // required: true,
    field: 'value',
    label: '值',
    component: 'Input',
  },
  {
    // required: true,
    field: 'uiComponentCodeList',
    label: 'UI组件',
    component: 'Select',
    componentProps: {
      mode: 'multiple',
      options: uiComponentList,
    },
  },
  {
    // required: true,
    field: 'unit',
    label: '单位',
    component: 'Select',
    componentProps: {
      options: priceUnitList,
    },
  },
  {
    // required: true,
    field: 'valueParseRule',
    label: '值解析规则',
    component: 'Input',
  },
  {
    // required: true,
    field: 'category',
    label: '分类',
    component: 'Select',
    componentProps: {
      options: bizMetaAttrKeyList,
    },
  },
];
